<template>
  <div>
    <el-dropdown>
      <span class="el-dropdown-link">
        {{ text }}<i class="el-icon-arrow-down el-icon--right"></i>
      </span>
      <el-dropdown-menu slot="dropdown" class="commentDropdown">
        <el-dropdown-item
          v-for="c in data"
          :key="c"
          :title="c"
          @click.native="handleSelectComment(c)"
          >{{ c }}</el-dropdown-item
        >
      </el-dropdown-menu>
    </el-dropdown>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  props: {
    text: String,
    data: Array,
  },
  methods: {
    handleSelectComment(c) {
      this.$emit("handleSelectComment", c);
    },
  },
};
</script>

<style lang="stylus"></style>